# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: Lin, Meng-Bo <linmengbo06890@proton.me>
pkgname=device-samsung-j3ltetw
pkgdesc="Samsung Galaxy J3 2016 (SM-J320YZ)"
pkgver=4
pkgrel=1
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
	postmarketos-base
	mkbootimg
	linux-postmarketos-qcom-msm8916
	soc-qcom-msm8916
	soc-qcom-msm8916-rproc
"
makedepends="devicepkg-dev"
source="deviceinfo modules-initfs"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
_pmb_select="soc-qcom-msm8916-rproc"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

nonfree_firmware() {
	pkgdesc="GPU/WiFi/BT/Video(/Modem) firmware"
	depends="firmware-qcom-adreno-a300 msm-firmware-loader firmware-samsung-j3ltetw-wcnss-nv"
	mkdir "$subpkgdir"
}

sha512sums="
8525b036da879cc13147d82374c39c89d8f867b31db11ba54959e9ae4f65815a145256536533bcb492f3aece73188ace76b18e63b100bb46da8fee53c53d4d2f  deviceinfo
27839a3da5c8b17516f64e0f7c38af2f502379553643a23834038cebd8ef47ea8d321fe796f99715102ce92f70a9fe0cb97062624a3589b98696154bfd7a4514  modules-initfs
"
